﻿@{
    ViewBag.Title = "客户端资源";
    ViewBag.Active = "/client/sc";
    bool isSuperAdmin = (ViewData["IsSuperAdmin"] as bool?) == true;
}
<el-table :data="tableData" border style="width: 100%" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
    <el-table-column prop="clientId" label="客户端Id" width="120" header-align="center">
    </el-table-column>
    <el-table-column prop="clientName" label="客户端名" width="180" header-align="center">
    </el-table-column>
    <el-table-column prop="allowedScopes" label="作用域" width="350" header-align="center">
        <template slot-scope="scope">
            <span v-html='scope.row.allowedScopes'></span>
        </template>
    </el-table-column>
    <el-table-column prop="allowedCorsOrigins" label="允许跨域" header-align="center">
        <template slot-scope="scope">
            <span v-html='scope.row.allowedCorsOrigins'></span>
        </template>
    </el-table-column>
    <el-table-column fixed="right" label="操作" width="85" v-if="@(isSuperAdmin?"true":"false")" align="center">
        <template slot-scope="scope">
            <el-button size="mini" @@click="handleEdit(scope.row)">编辑</el-button>
        </template>
    </el-table-column>
</el-table>
<div class="hx-float-right">
    <el-pagination @@current-change="handleCurrentChange"
                   :current-page.sync="queryParam.pageIndex"
                   :page-size="queryParam.pageSize"
                   background
                   layout="total, prev, pager, next"
                   :total="totalCount">
    </el-pagination>
</div>
<partial name="~/Views/ClientsManager/ScEdit.cshtml" />

@section scripts{
    <script src="~/vuejs/client.sc.js"></script>
}

